<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>dppsu: xdppsu_intr_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">dppsu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xdppsu__intr__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xdppsu_intr_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>Contains a design example using the <a class="el" href="struct_x_dp_psu.html" title="The XDpPsu driver instance data. ">XDpPsu</a> driver with interrupts. </p>
<p>Upon Hot- Plug-Detect (HPD - DisplayPort cable is plugged/unplugged or the monitor is turned on/off), the main link will be trained.</p>
<dl class="section note"><dt>Note</dt><dd>This example requires an interrupt controller connected to the processor and the DisplayPort TX core in the system. </dd>
<dd>
For this example to display output, the user will need to select the Test Pattern Generator or initialize and select an appropriate source. </dd>
<dd>
The functions DpPsu_PlatformInit and DpPsu_StreamSrc* are declared extern in <a class="el" href="xdppsu__common__example_8h.html" title="Contains a design example using the XDpPsu driver. ">xdppsu_common_example.h</a> and are left up to the user to implement.</dd></dl>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.0   aad 09/04/17 Initial creation.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a53e626bd69c448d2034d784209700cb2"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdppsu__intr__example_8c.html#a53e626bd69c448d2034d784209700cb2">DpPsu_IntrExample</a> (<a class="el" href="struct_x_dp_psu.html">XDpPsu</a> *InstancePtr, u16 DeviceId, INTC *IntcPtr, u16 IntrId, u16 DpIntrId, <a class="el" href="xdppsu_8h.html#a13e177802b0d46ab226b56650ce50fc0">XDpPsu_HpdEventHandler</a> HpdEventHandler, <a class="el" href="xdppsu_8h.html#a1b28e87125be77708843cd7941024b60">XDpPsu_HpdPulseHandler</a> HpdPulseHandler)</td></tr>
<tr class="memdesc:a53e626bd69c448d2034d784209700cb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The main entry point for the interrupt example using the <a class="el" href="struct_x_dp_psu.html" title="The XDpPsu driver instance data. ">XDpPsu</a> driver.  <a href="#a53e626bd69c448d2034d784209700cb2">More...</a><br/></td></tr>
<tr class="separator:a53e626bd69c448d2034d784209700cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdppsu__intr__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main function of the <a class="el" href="struct_x_dp_psu.html" title="The XDpPsu driver instance data. ">XDpPsu</a> interrupt example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a53e626bd69c448d2034d784209700cb2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 DpPsu_IntrExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_dp_psu.html">XDpPsu</a> *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">INTC *&#160;</td>
          <td class="paramname"><em>IntcPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>IntrId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DpIntrId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="xdppsu_8h.html#a13e177802b0d46ab226b56650ce50fc0">XDpPsu_HpdEventHandler</a>&#160;</td>
          <td class="paramname"><em>HpdEventHandler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="xdppsu_8h.html#a1b28e87125be77708843cd7941024b60">XDpPsu_HpdPulseHandler</a>&#160;</td>
          <td class="paramname"><em>HpdPulseHandler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The main entry point for the interrupt example using the <a class="el" href="struct_x_dp_psu.html" title="The XDpPsu driver instance data. ">XDpPsu</a> driver. </p>
<p>This function will set up the system with interrupts and set up the Hot-Plug-Event (HPD) handlers.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">InstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_dp_psu.html" title="The XDpPsu driver instance data. ">XDpPsu</a> instance. </td></tr>
    <tr><td class="paramname">DeviceId</td><td>is the unique device ID of the DisplayPort TX core instance. </td></tr>
    <tr><td class="paramname">IntcPtr</td><td>is a pointer to the interrupt instance. </td></tr>
    <tr><td class="paramname">IntrId</td><td>is the unique device ID of the interrupt controller. </td></tr>
    <tr><td class="paramname">DpIntrId</td><td>is the interrupt ID of the DisplayPort TX connection to the interrupt controller. </td></tr>
    <tr><td class="paramname">HpdEventHandler</td><td>is a pointer to the handler called when an HPD event occurs. </td></tr>
    <tr><td class="paramname">HpdPulseHandler</td><td>is a pointer to the handler called when an HPD pulse occurs.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_FAILURE if the system setup failed.</li>
<li>XST_SUCCESS should never return since this function, if setup was successful, is blocking.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If system setup was successful, this function is blocking in order to illustrate interrupt handling taking place for HPD events. </dd></dl>

<p>References <a class="el" href="xdppsu__common__example_8c.html#ab974530daf60911aba3ef16148bd85ad">DpPsu_SetupExample()</a>.</p>

<p>Referenced by <a class="el" href="xdppsu__intr__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main function of the <a class="el" href="struct_x_dp_psu.html" title="The XDpPsu driver instance data. ">XDpPsu</a> interrupt example. </p>
<p>If the DpPsuIntrExample function, which sets up the system succeeds, this function will wait for interrupts. Once a connection event or pulse is detected, link training will commence (if needed) and a video stream will start being sent over the main link.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_FAILURE if the interrupt example was unsuccessful - system setup failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Unless setup failed, main will never return since DpPsuIntrExample is blocking (it is waiting on interrupts for Hot-Plug-Detect (HPD) events. </dd></dl>

<p>References <a class="el" href="xdppsu__intr__example_8c.html#a53e626bd69c448d2034d784209700cb2">DpPsu_IntrExample()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
